//package com.hwbsite.hwbback.config;
//
//import lombok.SneakyThrows;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.context.annotation.Primary;
//import org.springframework.core.annotation.Order;
//import org.springframework.security.authentication.AuthenticationManager;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//import org.springframework.security.crypto.password.PasswordEncoder;
//
//
//@Primary
//@Order(90)
//@Configuration
//public class WebSecurityConfiguration  extends WebSecurityConfigurerAdapter {
//
////    @Resource
////    private UserByPhone userByPhone;
//
//    @Override
//    @SneakyThrows
//    protected void configure(HttpSecurity http) {
//        http.authorizeRequests().antMatchers("/actuator/**", "/token/**").permitAll().anyRequest().authenticated()
//                .and().csrf().disable();
//    }
////    @Override
////    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
////        auth.userDetailsService(userByPhone).passwordEncoder(passwordEncoder());
////    }
//
//    @Bean
//    @Override
//    @SneakyThrows
//    public AuthenticationManager authenticationManagerBean() {
//        return super.authenticationManagerBean();
//    }
//
//
//    @Bean
//    public PasswordEncoder passwordEncoder() {
//        return new BCryptPasswordEncoder();
//    }
//}
